<?php

require_once dirname(__FILE__).'/../lib/commentGeneratorConfiguration.class.php';
require_once dirname(__FILE__).'/../lib/commentGeneratorHelper.class.php';

/**
 * comment actions.
 *
 * @package    Amman to London
 * @subpackage comment
 * @author     Adel Abu-Saif <adeljas@msn.com>
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class commentActions extends autoCommentActions
{
    public function executeApprove($request){
        $obj = $this->getRoute()->getObject();
        $obj->set('is_approved', true);
        $obj->save();
        $this->redirect($request->getReferer());
    }
    public function executeUnApprove($request){
        $obj = $this->getRoute()->getObject();
        $obj->set('is_approved', false);
        $obj->save();
        $this->redirect($request->getReferer());
    }
}
